Skip to content

Reimplement 33 Synchrony::Commands functions at 100% - #415

Merged
gynt merged 51 commits into
sourcehold:mainfrom
kotijekriv:reimpl/Synchrony-Commands-100
Nov 24, 2026
Merged

gynt merged 51 commits into
sourcehold:mainfrom
kotijekriv:reimpl/Synchrony-Commands-100

Conversation

@kotijekriv

@kotijekriv kotijekriv commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

33 Synchrony::Commands functions at 100%, from gynt's drafts on his reimpl/Synchrony-Commands branch, with three small header commits they need. Pero asked on Discord to continue that branch, and gynt said to go ahead. Nine of the 33 were already 100% in gynt's own files, with stale status lines. They go in as his commits (author Gynt), unchanged except for small fixes that main's headers need in three of them, and each is followed by our style commit, which also sets the status line. The other 24 are finished from his drafts, with him as co-author. Wilps' versions on gynt's fork (reimpl/Wilps-2026-10-18, 8ca7861) already had forms the match needed in several of them, and those commits credit him. The draft scores below are gynt's, from his commit subjects. Each commit body also gives the draft's score on main's headers, and names the field renames main needed to build it.

Function Address Started from After
Commands::CommandSpawnEntity 0x004845B0 gynt's file, already 100% (461be14) 100.0%
Commands::SendPlayerToPlayerRequestOrResponse 0x00486140 gynt's file, already 100% (655eb2f) 100.0%
Commands::ResyncShortLayer 0x004840C0 gynt's file, already 100% (684e4f3) 100.0%
Commands::SendResyncIntLayer 0x0048A7C0 gynt's file, already 100% (c8d9db8) 100.0%
Commands::AnnounceTeamsAndPositions 0x00480BE0 gynt's file, already 100% (52aa702; it measured 97.5% on his branch) 100.0%
Commands::RemoveTowerSiegeEngine 0x00484B10 gynt's file, already 100% (d47a469) 100.0%
Commands::VoteKick_K_D_B_G_J 0x00485140 gynt's file, already 100% (42cfbd8) 100.0%
Commands::SendResyncUnknown 0x0048A510 gynt's file, already 100% (f2f2c13; it measured 92.7% on his branch) 100.0%
Commands::QueueChangeTaxes 0x00465700 gynt's file, already 100% (Wilps' body, ported by gynt in 6fa5eaa) 100.0%
Commands::CommandLoadMapHeader 0x00489C80 gynt's draft 96.2% (604e1bc) 100.0%
Commands::CommandChangeMapSelection 0x00483290 gynt's draft 95.3% (bcac165) 100.0%
Commands::ShareGameSeedAndMultiplayerSettingsAndStartGame 0x00480980 gynt's draft 93.9% (6c834c0) 100.0%
Commands::StartSendingMapFile 0x00485C10 gynt's draft 93.6% (b6a3f50) 100.0%
Commands::KickPlayerUnk 0x00484F30 gynt's draft 91.7% (227a8cd) 100.0%
Commands::ClickPlaceBuilding 0x00481D90 gynt's draft 91.7% (ebb7be7) 100.0%
Commands::AnnouncePlayerInformationSuchAsNameLordTypeAndAvailableAIVS 0x00480710 gynt's draft 91.4% (ca62515) 100.0%
Commands::AskForPlayerSlotAssignment 0x0048F870 gynt's draft 87.0% (5cfd575) 100.0%
Commands::StartReceivingMapFile 0x00485CC0 gynt's draft 81.4% (ed4a057) 100.0%
Commands::DestroyPlayer 0x0048A8A0 gynt's draft 79.7% (cf5944a) 100.0%
Commands::SendResyncCharLayer 0x00483A00 gynt's draft 76.8% (aeaf655) 100.0%
Commands::HostAnnounceRoundTable 0x00485F20 gynt's draft 76.4% (7c73f78) 100.0%
Commands::ShareMapHashForMapName 0x0048B6C0 gynt's draft 75.3% (ca943ba) 100.0%
Commands::SomePlayerNameUpdateCommand 0x00485380 gynt's draft 70.7% (e52878b) 100.0%
Commands::ShareQuitGameVote 0x0048B330 gynt's draft 69.2% (5153b24; 70.8% at c7021d2) 100.0%
Commands::ClickPlaceSiegeTent 0x004827E0 gynt's draft 68.2% (9997d6d) 100.0%
Commands::UpdateSkirmishGameMenuFaceBitmap 0x004863A0 gynt's draft 66.7% (c2eea52) 100.0%
Commands::ShareMapPart 0x0048B8F0 gynt's draft 66.7% (8f6faf1) 100.0%
Commands::SetUnitAssemblyPoint 0x00485830 gynt's draft 64.5% (fe31c33) 100.0%
Commands::SetPlayerNameUnk 0x00489AC0 gynt's draft 61.4% (5597d29) 100.0%
Commands::AutoSaveTriggered 0x00489880 gynt's draft 59.9% (7141365) 100.0%
Commands::ClickTauntOrChat 0x004895E0 gynt's draft 55.4% (a9a04a1) 100.0%
Commands::SubmitMSVMapIndexAndProperties 0x00489E30 gynt's draft 52.3% (82db2ef) 100.0% (see below)
Commands::CommandSwitchTeams 0x0048ACB0 gynt's draft 40.9% (73efa0f; 36.3% at 1030ebb) 100.0%, under /GL (see below)

SubmitMSVMapIndexAndProperties reads 99.5% raw and 100.0% normalised. Its frame is 0x17a0 bytes, so it calls the stack probe, and the one difference is that call's target name: call <OFFSET1> in the original, call _chkstk in ours. That is 100% by the call-target rule, as the review of #298 counted the same call (b5499a6), so its status line says 100.0%.

Measured.

  • Setup: the bundled MSVC1400-SP1 against the Steam Stronghold Crusader.exe (3bb0a8c1…5387ac5a), both resolver sets enabled locally (not committed), and sourcehold's reccmp with --resolve-wrapped-calls --ignore-security-cookie.
  • The 33 files built together on main 3458fea, with the two callees of CommandSwitchTeams and main's three /GL Synchrony files: 32 read 100.0% raw and normalised, and SubmitMSVMapIndexAndProperties 99.5% raw and 100.0% normalised. countPlayersInSameTeam, addChatMessageToDisplayList and receiveAllTransmittedCommands (on the /GL list already, and a caller of addChatMessageToDisplayList) read 100.0%.
  • Full build (all source files of main 3458fea with this branch at ca026fa, against a full build of main alone, every function resolver that has a .cpp switched on, each with its own compiler-flags-gl.txt): the 33 read as above. The main-alone build is of f489b72; 3458fea only adds files under tools/.
    • Of the 2,439 functions measured on main, 2,438 read exactly the same with this branch, and none read lower.
    • One read higher: UI::Rendering::DisplayMapDescriptionAndAllocatePlayersToSlots, from 94.8% to 100.0%. Main's status file already lists it at 100%. It uses neither new enum value and calls none of the 33. Its only difference on main is an eax/ecx swap in one add. Its file includes GameCommandType.hpp, so this looks like the symbol-count effect gynt found on Reimplement 88 Map::TileMapState functions at 100% #366, here in the good direction.
    • MapEditorLandscaping's GeneralButtons action handler doesn't compile on main since the last sync, so it was left out of both builds; Reimplement 88 Map::TileMapState functions at 100% #366 changes that file.
  • Checks: openshc-pr-fix finds nothing to change, and openshc-pr-check gives 0 ERROR and 41 CHECKs: the three header changes, and the ones explained below.
  • Not run in game.

What got them to 100%

Four forms come back again and again:

  • A lookup inside the call that uses it. The original calls the lookup in the middle of pushing the outer call's arguments, often after a constant such as 1000 or 250. So the map or player name's lookup is written inside the call that converts, copies or serializes it. This was the main step in CommandLoadMapHeader, CommandChangeMapSelection and ShareGameSeedAndMultiplayerSettingsAndStartGame, and one of the steps in eight more.
  • strcpy, strcat and wcslen in place of hand-written copy loops and searches for a string's end, because the original has them inline. ".map" and ".msv" are then the string macros. StartReceivingMapFile is the first file to include both string headers: ".map" is copied inline, while "wb" is pushed by its address (s_wb_005a5510).
  • One call in each branch, where the original pushes the other arguments first and picks one last: placeBuilding in ClickPlaceBuilding, addPlayerToCurrentPlayerArray in AskForPlayerSlotAssignment, processPlacementResourceLossForBuildingType in ClickPlaceSiegeTent, and three addChatMessageToDisplayList calls in ClickTauntOrChat. With the argument chosen before a single call, the compiler picks it first.
  • Faces on the ushort face pointer (bitmapsFaces_0x94 + (slot + 19) * 66 * 64, as drawBitmapFace indexes it) in place of byte sums through (int), in AskForPlayerSlotAssignment, UpdateSkirmishGameMenuFaceBitmap and SetPlayerNameUnk.

And per function:

  • StartSendingMapFile: the host's note of the answer is an if/else that stores 2 or 1. The draft's (hasMap != 0) + 1 adds in 16 bits now that main has the field as a short; the original adds in 32 bits.
  • KickPlayerUnk: one RemovePositionOfPlayer call after an if / else if, where the draft called it in each branch. The original pops the menu call's argument before the shared call.
  • ShareGameSeedAndMultiplayerSettingsAndStartGame: the map index is relative + scroll offset, because the original loads the relative selection first. quick_diff can't see the order; with scroll + relative, reccmp reads 98.0% (90.9% normalised). With main 45767c4 merged in (e274ec0), the same source reads 95.9% (83.3% normalised): the two loads tie in the register allocator, and main's header changes moved the tie the other way, the same as for LaunchSinglePlayerGameUnk on main. The source is unchanged; scroll + relative reads 98.0% there, and the two read into int const locals first, in either order, 85.1% to 86.2%.
  • HostAnnounceRoundTable: rewritten from the binary. The original keeps two bytes. One starts at 0 and becomes 1 when the round table is the active dialog, and that is what the host sends. The other receives the host's flag and is copied over the first before the tests.
  • ShareQuitGameVote: the eight votes are tested by a loop that clears a flag (the original has it unrolled), and the vote is stored through the local that holds the sender.
  • SetPlayerNameUnk and AutoSaveTriggered: the host's arm comes first, with its own deserialize call, because the original pushes the call's last three arguments before it tests isHost. In AutoSaveTriggered a client then returns early, where the original has a second epilogue.
  • SubmitMSVMapIndexAndProperties: the answer to the host (command 51) is written twice: once where the save doesn't exist, and once where its time or its units' hash differs. The compiler merges the two into the original's one copy, but the second copy makes it keep 0 in ebx for the whole function, as the original does.
  • ShareMapPart: the ending part returns. The file's end is tested first, with the tenth part in the else-if. The flag is cleared again in the ending part, and the length test is >= 0.
  • ClickTauntOrChat: the sender's range test comes first, and int receivers[9] = { 0 } is an array of its own, indexed by this machine's slot, with the taunt in an int before it.
  • SetUnitAssemblyPoint: no local for the unit category (parameter 0 in every index), and one int receives all three parameters.
  • ClickPlaceSiegeTent: the resource check's mapper starts as M_MAPPER_NULL, becomes the mangonel's or the ballista's, and the check runs when it isn't null. The compiler turns this into the original's jumps, so the draft's goto goes. The tiles are / 8.
  • DestroyPlayer: the first block returns. The first two stores read the slot from parameter 0 and the rest use the local, which gives the original's lea eax, [edx*4].
  • CommandSwitchTeams: three new lines in cmake/compiler-flags-gl.txt, for the file and its two callees that are finished on main, countPlayersInSameTeam and addChatMessageToDisplayList. The original keeps the flag and the constant 0 in one register (ebx) and tests the flag with test ebx, ebx. Under /GL the compiler does the same. Without it, the same source gets a zero register of its own and reads quick_diff 0.6609. The clears, counts and marks over the teams and slots are plain for loops that the compiler unrolls, where the draft wrote the copies out by hand. The search for the first empty team stays a loop, as in the original. The three kinds of request are separate ifs with early returns, in the original's order 0, 2, 1.

Behaviour fixed compared with the drafts

  • CommandChangeMapSelection, ShareGameSeedAndMultiplayerSettingsAndStartGame and SubmitMSVMapIndexAndProperties: the drafts read DAT_ArrayOfMapIndices[... - 1]. That was right on gynt's branch, where the array starts at 0x884 with 500 entries. On main it starts at 0x880 with 501, so the - 1 read the entry before the one the original reads. quick_diff can't see this; reccmp and the listing can.
  • HostAnnounceRoundTable: the byte the draft sent was never set. The original sends whether the round table is open.
  • ShareMapHashForMapName: a client whose copy of the map hashes differently only gets the quit dialog. The draft went on to queue the command that asks for the map file.
  • ShareMapPart: after the ending part (parameter 0 is -1), the draft went on to read the file and send a second part in the same command.
  • AutoSaveTriggered: the draft also stored the announcement time and cleared announcementReceivedBool on a client. The original does that on the host only.
  • ClickTauntOrChat: the draft had no range test for the sender (1 to 8). Its sound file name came from commandFunctions, which was that field's name on its branch. On main it is insultWavFiles.

Header changes (each in a commit of its own)

  • GCT_UNKNOWN_53 (52526f7), for SetPlayerNameUnk. 53 is queued in one place: 0x00489C50 push 0x35, then 0x00489C61 call 0x00489100 (queueCommand). A scan of the 215 calls to queueCommand finds no other immediate 53. queueCommand dispatches the type through the table at 0x00B38E10 (0x004891E7 mov edx, [ecx*4 + 0x00B38E10], call edx), and the receive paths at 0x0048017F, 0x0048034A and 0x0048041E index the same table. Entry 53, at 0x00B38EE4, is 0x00483850, Commands::SharePlayerName.
  • GCT_UNKNOWN_51 (7c54a03), for SubmitMSVMapIndexAndProperties. 51 is queued only at 0x0048A0B1 push 0x33, then 0x0048A0C3 call 0x00489100, in SubmitMSVMapIndexAndProperties itself. Entry 51 of the same table, at 0x00B38EDC, is 0x004834B0, Commands::ShareMSVMapIndex. Both names follow the enum's other unnamed values (GCT_UNKNOWN_33, _37, _40). Wilps' header on gynt's fork names the two values GCT_SHARE_MSV_MAP_INDEX and GCT_SHARE_PLAYER_NAME.
  • ProtocolDefinedData::insultWavFiles is char* [21] (d991122), not char** [21], for ClickTauntOrChat. The data at 0x00B38DBC is 21 plain char pointers: element 0 is NULL, and elements 1 to 20 point at "insult1.wav" (0x005A6E14) to "insult20.wav" (0x005A6D04). ClickTauntOrChat passes an element as the file name: 0x004897C1 mov ecx, [eax*4 + 0x00B38DBC], push ecx, then 0x004897D0 call 0x00478360 (resolveResourceFileName, whose parameter is a char const*). Nothing else on main uses the field.

Each sits just before the commit that uses it, and that code needs no cast. The declaration check will fail and label this PR until main has these lines. Then we merge main in, and the check passes.

Left out

Kept as they are, measured with quick_diff

Function Kept The cleaner form
CommandSpawnEntity readBuffer also receives the brazier's gold cost, as in the original a goldCost of its own (frame 12 bytes, the original's 8): 1.0000 -> 0.9592
CommandLoadMapHeader mapChecksum and wideMapName serve both halves one per half (frame 0x17b0 with _chkstk): 0.9519 -> 0.8134, with -s
CommandChangeMapSelection selectionIndex serves both halves; the map index is set in an if/else one per half (frame 0xfb4): 0.9302 -> 0.8372 with -s; int mapIndex = 0; and one if: 0.9884 -> 0.9357
KickPlayerUnk the AI slot tested before it is cleared a plain store: 0.9636 -> 0.8704
RemoveTowerSiegeEngine unitType as a UnitTypeShort an int (movsx and a 32-bit compare): 1.0000 -> 0.9630
ClickPlaceBuilding one placeBuilding call in each branch the player in a local, or a conditional in the arguments: 1.0000 -> 0.9250
AskForPlayerSlotAssignment the delay test as > -1 >= 0: 1.0000 -> 0.9852
HostAnnounceRoundTable the received flag copied over the first byte the tests reading the received byte: 1.0000 -> 0.9730
ShareQuitGameVote the vote stored through the sender's local the field read again: 1.0000 -> 0.9315
ClickTauntOrChat taunt reused for the insult's number, as the original reuses its stack slot a fresh local: 0.9449 -> 0.8385
SubmitMSVMapIndexAndProperties the answer to the host written in both places written once (a goto, an early return, a flag or one condition): 0.9920 -> 0.8248
SetUnitAssemblyPoint no local for the unit category a local (the store of x moves behind the building lookup): 1.0000 -> 0.9725
ClickPlaceSiegeTent the mapper starts as null and is set per engine an if/else under one condition: 0.9826; a ternary: 0.9623; two calls: 0.9769
DestroyPlayer the slot from parameter 0 in the first two stores, the local elsewhere the local everywhere: 0.8880; the parameter everywhere: 0.8854 (kept: 0.9880)

CommandSwitchTeams, measured with reccmp under /GL (100.0% as it is): canSwitch declared just above its test, or as one const expression there, reads 66.3%. teamCount declared just above its counting loop reads 97.1% for either of the two copies alone and 83.3% for both.

The kept forms that a reader might tidy away each have a one-line comment.

Buffer sizes from the original's frame: CommandLoadMapHeader's WCHAR wideMapName[1010] and char mapName[2008] (0xfc8 = 4 + 4 + 2020 + 2008 + 4 for the cookie). WCHAR wideMapName[1002] in ShareGameSeedAndMultiplayerSettingsAndStartGame (0x7d8 = 2004 + 4) and CommandChangeMapSelection (0x7dc = 4 + 2004 + 4). SubmitMSVMapIndexAndProperties' char[2008] and WCHAR[2006] (0x17a0 = 12 + 12 + 2008 + 4012 + 4). UpdateSkirmishGameMenuFaceBitmap declares slot, rowIndex and rowBytes[128] in the frame's order.

The checker's CHECKs

  • Locals declared without a value: each is filled through its address by the deserialize call (or getBuildingCost) right below it. mapChecksum, selectionIndex, mapHash and byteCount serve both halves of their function, as one stack slot does in the original.
  • Numeric case labels: the six message kinds of SendPlayerToPlayerRequestOrResponse, the layer numbers of ResyncShortLayer (1 to 9) and SendResyncCharLayer (10 to 28), and RemoveTowerSiegeEngine's 1 (an entity) and 2 (a unit). The headers have no enums for them, and main's senders of the message kinds write numbers too.
  • != TRUE and '\0': isSkirmishTrail in CommandChangeMapSelection and the chat line's flag in SomePlayerNameUpdateCommand, which the original compares with 1 (a comment line says so, as main's MenuItemActionHandler_InGameMenu_MainButtons does). The '\0's are string terminators stored into char arrays, in CommandChangeMapSelection and DestroyPlayer.
  • Casts on globals: ClickPlaceBuilding's (MappersEnum)(ushort)DAT_GameCommandParam2 is the original's 16-bit load (movzx). ClickPlaceSiegeTent's (int)DAT_GameCommandParam1 / 8 is its signed division (cdq), on a parameter the header has as undefined4.

Things the original does that look odd, kept

  • CommandLoadMapHeader sets DAT_CommandSize to 1008 (mov [0x194af98], 0x3f0), but serializes 2008 bytes. For a time-0 command, main's queueCommand hands DAT_CommandSize bytes to transmitCommand, so the checksum (offset 2000) and the index (offset 2004) may never reach the client. We haven't read transmitCommand, so this is as far as the evidence goes.
  • AnnounceTeamsAndPositions reads the AI type and the AI variation into the receiver's own slot (currentPlayerSlotID, at 0x00480CFD and 0x00480D1A), not the sender's. It looks like a bug of the original.
  • SetPlayerNameUnk and AutoSaveTriggered convert the name into shortMapName with a size of 1000, but the field has 120 bytes.
  • CommandSwitchTeams counts the players per team number in teamCounts, but its two count tests index that array with a player's slot: the sender's at 0x0048AE68 and parameter 0's at 0x0048B0F5. That is only right while a player's team number equals its slot number. The draft has it too.

What some placeholders hold

  • unknownMapName_01: on a client, the map's name without ".map" (ShareMapHashForMapName).
  • SEC_TileMap1104 and SEC_PathfindingCostTileMap1105[9]: resynced as layers 18 and 20 to 28 by SendResyncCharLayer.
  • playerNames2 and DAT_CurrentPlayerFullIDArray2: second copies of the players' names and IDs. Faces 28 to 35 are a second copy of the players' faces 20 to 27 (SetPlayerNameUnk).
  • mapSendingByteBufferAddress: the bytes sent or received per slot (Wilps: mapBytesTransferredPerSlot).
  • ClickTauntOrChat's taunt: 10000 is a message without a sender, a negative taunt is insult -1 - taunt for the player in parameter 0, a positive one is an insult from the sender, and 0 is typed text.

Proposed, not changed here

  • SetPlayerNameUnk's name looks wrong. It is command 40 (table entry 40 is 0x00489AC0), and MenuItemActionHandler_SaveLoadMap_Buttons copies the chosen map's name into shortMapName before it queues 40. So the command shares the map's name, which setSessionDescription then uses.
  • syncedStateBase is an int at 0x194 of MapAndTimeState, but SendResyncUnknown's parts run from there to exactly the end of the struct (0x194 + 18 * 14566 + 16 = 262608 = sizeof(MapAndTimeState)). A sub-struct would explain its (char*)&syncedStateBase + part * 14566. After those parts it resyncs the AIV state's map info (816 bytes), so a better name for SendResyncUnknown could say both.
  • MemCopyFromParameter's third parameter is named playerID, but both callers pass a part or chunk number, and it only feeds the "ID:%d" of the function's mismatch message. Its destination could be void*, so SendResyncIntLayer's (char*) cast would go.
  • DAT_GameCommandParam1 and protocolInvokerPlayerID as int, not undefined4 (parameter 0 is an int already). A retype touches every user on main, so it is left for the header sync.
  • BOOLEnum candidates, only ever 0 or 1 and tested by truth: lobbyStateReceived, announcementReceivedByPlayer, saveRelated and shouldSendAnnouncementUnk.
  • Enums: the six player-to-player message kinds, named after their handlers (ally request attack/defence, ally requesting goods, ally goods request, deny, accept, deny 2); the nine resync layers (1 random, 2 walk, 3 organism, 4 building, 5 unit, 6 entity, 7 certain path, 8 path connection, 9 macro); DTET_NONE = 0 in DefensiveTowerEngineType; the refund codes -1 to -4 of giveBackResourceForDestroyedBuilding (-3 a tower mangonel, -4 a tower ballista); quitGameVoteRelated (0, 2) and DAT_MapFileReceivingState.
  • The assembly point arrays: SetUnitAssemblyPoint indexes barracksAssemblyPoints[7], mercenaryAssemblyPoints[7] and specialBuildingAssemblyPoints[5] with categories up to 9, as the original does. The arrays may be longer, or one array of points: the original works out all three from one base.

Other PRs

🤖 Generated with Claude Code

gynt and others added 30 commits November 17, 2026 04:30
CommandSpawnEntity, gynt's version as it stands on reimpl/Synchrony-Commands (upstream ca943ba and his fork's
6fa5eaa), where the status line still reads 73.5% (Style pass, asm differs): the file was last changed in his
461be14 ("reimplement: SHC_3BB0A8C1_0x004845B0 100.0% Reimplemented", 2026-10-03), which left the status line of
3b215e1 in place. Taken unchanged; it compiles on main's headers as it is. With both resolver sets on it reads
reccmp 100.0 (normalized 100.0). What main's style rules need on top follows in our own commit, which also sets the
status line.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) and quick_diff
147/147 at 1.0000 before and after.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return, and entityID is declared where it gets its value.
- local_8 is `readBuffer`: the buffer each parameter is read into. It also receives the brazier's gold cost, as in
  gynt's version and in the original: a `goldCost` of its own makes the frame 12 bytes where the original has 8
  (quick_diff 0.9592). local_4 is `stoneCost`.
- The doubled `(int)((int)(...))` casts on the six parameters are gone, and the narrowing casts are `(char)` and
  `(short)` alone.

The status line goes to 100.0% (Reimplemented) with this commit.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
SendPlayerToPlayerRequestOrResponse, gynt's version as it stands on reimpl/Synchrony-Commands (upstream ca943ba
and his fork's 6fa5eaa), where the status line still reads 70.8% (Style pass, asm differs): the file was last
changed in his 655eb2f ("reimplement: SHC_3BB0A8C1_0x00486140 100.0% Reimplemented", 2026-10-03), which left the
status line of ffed63e in place. Taken unchanged; it compiles on main's headers as it is. With both resolver sets
on it reads reccmp 100.0 (normalized 100.0). What main's style rules need on top follows in our own commit, which
also sets the status line.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…tyle guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) and quick_diff
136/136 at 1.0000 before and after.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return, and the switch cases end in break.
- `short local_4[2]` is `short messageKind`, read straight into DAT_GameCommandParam0 with no cast.
- The doubled `(int)((int)(...))` casts on the parameters are gone, and the command size is decimal.

The six message kinds stay numbers: the headers have no enum for them, and main's two senders (Allies and
AlliesOrder) write numbers too.

The status line goes to 100.0% (Reimplemented) with this commit.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
CommandLoadMapHeader, from gynt's draft on reimpl/Synchrony-Commands (604e1bc, 96.2% there; the file was last
changed in 4242ae2, "Synchrony/Commands: drop the hand-written /GS cookie"). reccmp 100.0 (normalized 100.0).
quick_diff 104/104 at 0.9904 (the draft: 0.9808 on main's headers); the rest is the /GS cookie load, which reccmp is
told to ignore.

What the match needed: the map name lookup is written inside the call that converts it,
multiByteToWideCharWithSize(wideMapName, mapNames_getLoadedMapNameForIndex(...), 1000). The original pushes the 1000
before it calls the lookup; with the name in a local first, as in the draft, the 1000 is pushed after the call. The
checksum's lookup is nested the same way. Wilps' version on gynt's fork (reimpl/Wilps-2026-10-18, 8ca7861,
2026-10-27) already nests the first lookup like this.

The buffers' sizes are the original's frame: 0xfc8 = 4 (checksum) + 4 (index) + 2020 (WCHAR[1010]) + 2008
(char[2008]) + 4 (cookie). mapChecksum and wideMapName serve both halves: with one local per half the frame grows to
0x17b0 and gets a _chkstk call (quick_diff -s 0.8134 with 105 instructions, against 0.9519 with 104). mapIndex and
mapName are declared where they are first filled.

DAT_CommandSize keeps the original's 1008 (the three parameters take 2008 bytes); its comment says the value is the
original's.

Style: the first include is ../Commands.func.hpp, the using lines and block comments are gone, the execute half is an
early return, and the locals have names (mapChecksum, mapIndex, wideMapName, mapName).

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
StartSendingMapFile, from gynt's draft on reimpl/Synchrony-Commands (cf8d0fd and c48c8e6 at 80.5%, b6a3f50 at
93.6%, his newest commit on the file; the branch's status line reads 80.5%). reccmp 100.0 (normalized 100.0),
quick_diff 46/46 at 1.0000 (the draft: 0.9783 on main's headers).

On main the draft needed one rename to compile: field282_0x109d98 is mapTransferStatePerPlayer. The name is gynt's,
from his 51126b7 ("names: four GameSynchronyState lobby and map-transfer fields", 2026-10-05); main has it since
the Ghidra sync b734082 (sourcehold#260).

What the match needed: the host's note of the answer is an if/else that stores 2 or 1. The draft's
`(local_1 != 0) + 1` is added in 16 bits now that the field is a short (add dx, 1); the original adds in 32 bits
(add edx, 1) and stores dx, which is what the if/else compiles to.

Style: the first include is ../Commands.func.hpp, the using lines and block comments are gone, the execute half is an
early return, local_1 is `hasMap`, hasMap and isHost are tested by truth and the loop bound is countof().

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
KickPlayerUnk, from gynt's draft on reimpl/Synchrony-Commands (5760220 at 86.2%, 227a8cd at 91.7%, his newest
commit on the file). reccmp 100.0 (normalized 100.0). quick_diff 55/55 at 0.9636 (the draft: 54 instructions at
0.8991 on main's headers); the rest is the timeGetTime import call, which reccmp resolves, and quick_diff reading
the sound flags as an address.

What the match needed:
- One RemovePositionOfPlayer call after an if / else if, where the draft had the call in each branch with a return
  between them. The original pops the menu call's argument before the shared call (add esp, 4 ... pop ecx), and
  keeps the player in eax on both paths; two calls in the source give one add esp, 8 and the player in ecx.
- getFileNameOfCurrentActiveResource is called inside playSoundOnStream3Unk's argument list, so the flags are pushed
  before the call, as in the original. Wilps' version on gynt's fork (reimpl/Wilps-2026-10-18, 8ca7861,
  2026-10-27) already nests it like this.

The AI slot is tested before it is cleared: a plain store measures quick_diff 0.8704 with 53 instructions.

Style: the first include is ../Commands.func.hpp, the using lines and block comments are gone, the execute half is an
early return, "insult1.wav" is s_insult1_wav_005a6e14, the sound flags are the three FLAG_SOUND_* names | 1 (as in
main's playVideoOverMap) and 0x16 is 22.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ResyncShortLayer, gynt's version as it stands on upstream's reimpl/Synchrony-Commands (ca943ba), where the status
line still reads 52.8% (Style pass, asm differs): the file was last changed in his 684e4f3 ("reimplement:
SHC_3BB0A8C1_0x004840C0 100.0% Reimplemented", 2026-10-03), which left the status line of 8f145c3 in place. His
fork's branch (6fa5eaa) has the file of 5d76887, one commit older. Taken unchanged; it compiles on main's
headers as it is. With both resolver sets on it reads reccmp 100.0 (normalized 100.0). What main's style rules need
on top follows in our own commit, which also sets the status line.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) and quick_diff
186/186 at 1.0000 before and after.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return (wrong action plan, or the host), and the switch cases end in break.
- Each layer's chunk is `&layer[chunk * 1256]` in place of `layer + chunk * 0x4e8`, and the sizes are decimal
  (2512 for both `0x9d0` and `(size_t)((int)(2512))`).

The nine layer numbers stay numbers: the headers have no enum for them.

The status line goes to 100.0% (Reimplemented) with this commit.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
SendResyncIntLayer, gynt's version as it stands on upstream's reimpl/Synchrony-Commands (ca943ba), where the
status line still reads 87.5% (Style pass, asm differs): the file was last changed in his c8d9db8 ("reimplement:
SHC_3BB0A8C1_0x0048A7C0 100.0% Reimplemented", 2026-10-03), which left the status line of 9675ea5 in place. His
fork's branch (6fa5eaa) has the older file. Taken unchanged; it compiles on main's headers as it is. With both
resolver sets on it reads reccmp 100.0 (normalized 100.0). What main's style rules need on top follows in our own
commit, which also sets the status line.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) and quick_diff
55/55 at 1.0000 before and after.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return (wrong action plan, or the host).
- The chunk is `&LogicLayer[chunk * 628]` in place of `LogicLayer + chunk * 0x274`, the size is 2512 and
  layerOffset is `int const chunkStart`.

The status line goes to 100.0% (Reimplemented) with this commit.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
AnnounceTeamsAndPositions, gynt's version as it stands on upstream's reimpl/Synchrony-Commands (ca943ba), where
the status line still reads 80.7% (Style pass, asm differs): the file was last changed in his 52aa702
("reimplement: SHC_3BB0A8C1_0x00480BE0 97.5% Reimplemented", 2026-10-03), which made the nine team bytes a memcpy
and left the status line of eb34b1d in place. The file also carries his 9bf755f ("reimplement:
SHC_3BB0A8C1_0x0048A2E0 86.6% Reimplemented", whose body is about this function: it restored the single 9-byte
buffer). His fork's branch (6fa5eaa) has the older file. Taken unchanged; it compiles on main's headers as it is.
With both resolver sets on it now reads reccmp 100.0 (normalized 100.0), where his commit measured 97.5. What main's
style rules need on top follows in our own commit, which also sets the status line.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) and quick_diff
121/121 at 0.9917 before and after (the rest is the /GS cookie load, which reccmp is told to ignore).

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return, and the sender test is `< 1 || > 8` in place of `- 1U <= 7`.
- The slot values are `&array[slot]` in place of `array + slot`, and every size in the file is sizeof() of what is
  read or written.
- `_isHost` is `BOOLEnum senderIsHost`, tested by truth; `byte local_10[9]` is `char receivedGroups[9]`, the type of
  DAT_PlayerGroupArray. Both are declared where they are filled.

The status line goes to 100.0% (Reimplemented) with this commit.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ShareGameSeedAndMultiplayerSettingsAndStartGame, from gynt's draft on reimpl/Synchrony-Commands (6c834c0, 93.9%
there; the file was last changed in 4242ae2, "Synchrony/Commands: drop the hand-written /GS cookie"). On main's
headers the draft reads reccmp 96.9 (normalized 88.5), and now 100.0 (normalized 100.0). quick_diff 98/98 at 0.9898
(the draft: 0.9592); the rest is the /GS cookie load, which reccmp is told to ignore.

What the match needed:
- The map name lookup is written inside the call that converts it, so the 1000 is pushed before the lookup is
  called, as in the original.
- The map index is `relative + scroll offset`: the original loads the relative selection first. quick_diff can't
  see this (both are globals to it); the compiler's listing and reccmp can.
  With scroll + relative reccmp reads 98.0 (normalized 90.9); a comment line keeps the order from being "fixed".

Fix against the draft on main's headers: the draft read DAT_ArrayOfMapIndices[scroll + relative - 1]. Its branch
has the array at 0x884 with 500 entries; main has it at 0x880 with 501, so on main the `- 1` reads the entry before
the one the original reads (the original's address is the array's start plus the sum).

Wilps' version on gynt's fork (reimpl/Wilps-2026-10-18, 8ca7861, 2026-10-27) already nests the lookup and indexes
the list without the `- 1` (his header has it at 0x880); his sum is scroll + relative.

Style: the first include is ../Commands.func.hpp, the using lines and block comments are gone, the execute half is an
early return, and local_7d8 is wideMapName.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
CommandChangeMapSelection, from gynt's draft on reimpl/Synchrony-Commands (3e3269d at 93.0%, bcac165 at 95.3%,
his newest commit on the file). On main's headers the draft reads reccmp 93.0 (normalized 85.4), and now 100.0
(normalized 100.0). quick_diff 86/86 at 0.9884 (the draft: 0.9535); the rest is the /GS cookie load, which reccmp
is told to ignore.

What the match needed: the map name lookup is written inside the call that converts it, so the 1000 is pushed
before the map index and the lookup's call, as in the original. The map index keeps its if/else and its local: with
`int mapIndex = 0;` and one if, quick_diff reads 0.9357 with 85 instructions.

Fix against the draft on main's headers: the draft read DAT_ArrayOfMapIndices[selectionIndex - 1]. Its branch has
the array at 0x884 with 500 entries; main has it at 0x880 with 501, so on main the `- 1` reads the entry before the
one the original reads. Wilps' version on gynt's fork (reimpl/Wilps-2026-10-18, 8ca7861, 2026-10-27) indexes the
list without the `- 1` too (his header has it at 0x880); it keeps the lookup in a local.

Style: the first include is ../Commands.func.hpp, the using lines and block comments are gone, the execute half is an
early return, _mapName is wideMapName and the command size is decimal. isSkirmishTrail is compared with TRUE, as the
original compares it with 1 (main does the same in MenuItemActionHandler_InGameMenu_MainButtons).

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
RemoveTowerSiegeEngine, gynt's version as it stands on upstream's reimpl/Synchrony-Commands (ca943ba), where the
status line still reads 75.0% (Style pass, asm differs): the file was last changed in his d47a469 ("reimplement:
SHC_3BB0A8C1_0x00484B10 100.0% Reimplemented", 2026-10-03), which left the status line in place. His fork's branch
(6fa5eaa) has the older file. One change so that it builds on main: Building::containsSiegeMangonel1OrBallista2 is
defensiveTowerEngineType there (two lines); nothing else changed. With both resolver sets on it reads reccmp 100.0
(normalized 100.0). What main's style rules need on top follows in our own commit, which also sets the status line.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) and quick_diff
81/81 at 1.0000 before and after.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The switch cases end in break, and the doubled `(int)((int)(...))` casts are gone.
- Names: `short local_4[2]` is `short readBuffer`, `_entity` is `id` (a unit's or an entity's, by the kind),
  `iVar2` is `buildingID` and `UVar1` is `unitType`, each declared where it gets its value. unitType stays a
  UnitTypeShort: as an int it is loaded with movsx and compared in 32 bits, where the original compares cx
  (quick_diff 0.9630).
- A comment line names the two refund codes, -3 for a tower mangonel and -4 for a tower ballista.

The engine field is cleared with 0: DefensiveTowerEngineType has names for the mangonel (1) and the ballista (2) only.

The status line goes to 100.0% (Reimplemented) with this commit.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
VoteKick_K_D_B_G_J, gynt's version as it stands on upstream's reimpl/Synchrony-Commands (ca943ba), where the
status line still reads 52.8% (Style pass, asm differs): the file was last changed in his 42cfbd8 ("reimplement:
SHC_3BB0A8C1_0x00485140 100.0% Reimplemented", 2026-10-03), which left the status line in place. His fork's branch
(6fa5eaa) has the older file. One change so that it builds on main: GameSynchronyState::DPLAYX_4A is an
IDirectPlay4* there, so the test against `(IDirectPlay4A**)0x0` is a test against NULL (one line); nothing else
changed. With both resolver sets on it reads reccmp 100.0 (normalized 100.0). What main's style rules need on top
follows in our own commit, which also sets the status line.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) and quick_diff
50/50 at 0.9800 before and after (the rest is the call through the DirectPlay interface, which quick_diff reads as a
direct call on our side).

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- CancelMessage is called on DPLAYX_4A as it is typed on main, with no cast, as disconnectDPlay does.
- 0x16 is 22.

The status line goes to 100.0% (Reimplemented) with this commit.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
SendResyncUnknown, gynt's version as it stands on upstream's reimpl/Synchrony-Commands (ca943ba), where the status
line still reads 75.9% (Style pass, asm differs): the file was last changed in his f2f2c13 ("reimplement:
SHC_3BB0A8C1_0x0048A510 92.7% Reimplemented", 2026-10-03), which left the status line in place. His fork's branch
(6fa5eaa) has the older file. One change so that it builds on main: MapAndTimeState::field192_0x194 is
syncedStateBase there (three lines); nothing else changed. With both resolver sets on it now reads reccmp 100.0
(normalized 100.0), where his commit measured 92.7. What main's style rules need on top follows in our own commit,
which also sets the status line.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) and quick_diff
123/123 at 0.9919 before and after (the rest is the /GS cookie load, which reccmp is told to ignore).

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return (wrong action plan, or the host), and the three kinds of part are one
  if / else if chain in each half.
- Each part's address is `(char*)&mapAndTime.syncedStateBase + part * 14566`, in place of the sum through `(int)`.
  Part 18 is written the same way in both halves; the sending half had `startingTroops[7] + 0x10` for the same
  address, and the compiler folds the sum to it there, since the part is known to be 18.
- The sizes are decimal, and the AIV map info's is sizeof().
- "Glob %d" is s_Glob__d_005a74a0, local_3ec is partName, and the offsets in the text are
  `part * 14566 + offsetof(MapAndTimeState, syncedStateBase)` in place of `0x194` and `0x401c0`.
- Part 19 passes the part number in place of the literal 0x13 (the same code: the compiler knows it is 19 there).

The status line goes to 100.0% (Reimplemented) with this commit.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
QueueChangeTaxes, as it stands on gynt's fork's reimpl/Synchrony-Commands at 6fa5eaa ("Adopt the Wilps
implementations that measure better here (sourcehold#20)", 2026-11-02). The body is Wilps's, from gynt's fork's
reimpl/Wilps-2026-10-18 (8ca7861): gynt ported it over his own draft of 60ff6eb, which upstream's branch still
has, and measured it at quick_diff 0.9231 on that branch's headers; the status line there reads 0.0% (Pending, not
matched by reccmp). Taken unchanged; it compiles on main's headers as it is. With both resolver sets on it reads
reccmp 100.0 (normalized 100.0). What main's style rules need on top follows in our own commit, which also sets the
status line.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
On top of Wilps's body in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) and quick_diff
39/39 at 0.9487 before and after (the rest is the timeGetTime import call and the tail jump into
SetTutorialHintActiveWithTimestamp, both of which reccmp resolves).

- The first include is ../Commands.func.hpp, once; the using lines and the block comment above the function are
  gone.
- An unchanged slider is an early return, and the slider is read from its field where it is used.
- The refused tutorial change is tested by truth (`!Tutorial_IsActionAllowed(...)`), and 0xd is 13.

Two things in Wilps's body carry the match, and both stay: the return after the tutorial hint (the original jumps
into the hint function and ends there), and the player data indexed through currentPlayerSlotID each time, with no
slot local (with one, the slider is read once after timeGetTime where the original reads it twice).

The status line goes to 100.0% (Reimplemented) with this commit.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ClickPlaceBuilding, from gynt's draft on upstream's reimpl/Synchrony-Commands (ebb7be7, 91.7% there, his newest
commit on the file; the status line reads 89.6%). On main's headers the draft reads reccmp 91.7 (normalized 65.5),
and now 100.0 (normalized 100.0). quick_diff 120/120 at 1.0000 (the draft: 0.9250).

On main the draft needed one rename to compile: field299_0x109e7c is editorPlacementPlayerID.

What the match needed: one placeBuilding call in each branch of the map editor test, the editor's chosen player in
one and the command's sender in the other. The original pushes the five other arguments first and picks the player
last. With the player in a local chosen before a single call (the draft), or as a conditional inside the call's
arguments, the compiler picks the player first and pushes afterwards (quick_diff 0.9250 for both).

Style: the first include is ../Commands.func.hpp, the using lines and block comments are gone, the execute half is an
early return, the resource check is tested by truth in place of `(iVar1 = ..., iVar1 == 0)`, and the doubled
brackets around the arguments are gone.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
AnnouncePlayerInformationSuchAsNameLordTypeAndAvailableAIVS, from gynt's draft on upstream's
reimpl/Synchrony-Commands (2d091b7 and ca62515 at 91.4%; the file was last changed in 4242ae2,
"Synchrony/Commands: drop the hand-written /GS cookie"). On main's headers the draft reads reccmp 93.3 (normalized
80.4), and now 100.0 (normalized 100.0). quick_diff 162/162 at 0.9938 (the draft: 0.9321); the rest is the /GS
cookie load, which reccmp is told to ignore.

What the match needed:
- The three copy loops over pointers are strcpy calls: the sender's name into the final results, this machine's own
  name into its slot, and that name into the final results. The first loop then gets the original's form, one
  pointer and the distance between the two strings.
- The own name's lookup is written inside the call that converts it, so the 250 is pushed before the lookup is
  called. Wilps's version on gynt's fork (reimpl/Wilps-2026-10-18, 8ca7861, 2026-10-27) already nests it; his
  copies are loops.

Style: the strcpy pragma, the first include is ../Commands.func.hpp, the using lines and block comments are gone,
the execute half and the empty sender slot are early returns, the locals have names (senderSlot, lordIcon, lordType,
wideName) and are declared where they are filled, the scalar and AIV list sizes are sizeof(), the text array index
is TAIT_ZERO, and the host test is by truth after the two lord stores.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
AskForPlayerSlotAssignment, from gynt's draft on upstream's reimpl/Synchrony-Commands (c8da6f2 at 52.6%, 864e522
at 53.9%, 5cfd575 at 87.0%, his newest commit on the file; the status line reads 53.9%). On main's headers the
draft reads reccmp 87.0 (normalized 71.5), and now 100.0 (normalized 100.0). quick_diff 135/135 at 1.0000 (the
draft: 134 instructions at 0.8848).

On main the draft needed one rename to compile: TextureRenderCore's field69_0x98 is bitmapFaceSizes.

What the match needed:
- One addPlayerToCurrentPlayerArray call in each branch of the single player test, with 1 in one and the received
  player ID in the other. The original pushes the argument in each branch and shares the call; with the argument in
  a local chosen before one call the compiler picks it first.
- The face copies are written on the ushort pointer, `bitmapsFaces_0x94 + (slot + 19) * 66 * 64`, as drawBitmapFace
  indexes it, in place of byte sums through `(int)`. The original loads the lord icon first and forms `icon - 2`
  with lea; the sums through int load in another order.
- The delay test is `> -1` (cmp -1 / jle), not `>= 0`.

gynt's 6cbbfc2 on his fork's reimpl/UI-MenuItems-development (2026-11-02, "flip 3 comparisons in Synchrony")
writes the delay test as `-delay > 1`. That is another test (delay < -1), so it is not taken.

Style: the first include is ../Commands.func.hpp, the using lines and block comments are gone, the execute half,
the solitary game and the client are early returns, the eight stores of -1 are a loop over the ID array (slot 1
gets its 1 after it; the same code), `_commandOriginPlayer` is senderSlot, and the face size is a FACE_SIZE
constant (66 * 64 * 2, as setBMPFacesToMagenta has it) in place of 0x2100, with FACE_HEIGHT and FACE_WIDTH for the
66 and 64 of the pixel offsets.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
HostAnnounceRoundTable, rewritten from the binary. Wilps's version on gynt's fork (reimpl/Wilps-2026-10-18,
8ca7861, 2026-10-27) is the same function. gynt's draft on upstream's reimpl/Synchrony-Commands (eacec5f, then
7c73f78 at 76.4%, "Return recovered, merged slot differs"; the status line reads 0.0%) reads reccmp 76.4
(normalized 76.4) on main's headers, and this 100.0 (normalized 100.0). quick_diff 75/75 at 1.0000 (the draft: 72
instructions at 0.8299). The file is named after the function now (HostAnnounceRoundTable.cpp; the draft's was
HostAnnounceRoundtable.cpp).

The original keeps two bytes on the stack:
- roundTableOpen starts at 0 and becomes 1 when this machine's active dialog is the round table; the sending half
  serializes it and returns.
- The receiving half reads the host's flag into a second byte and copies it over the first, which the tests then
  read (reading the second byte loses the match: quick_diff 0.9730 with 73 instructions). For the host or in the
  lobby menu: with no dialog open and the flag set, the round table opens; with no dialog open and the flag clear,
  nothing more happens; and a clear flag closes an open round table.

Fix against the draft (7c73f78): the byte it sent, `local_2`, was never set. The draft read an incoming ecx, which
the function doesn't have, into the byte the receiving half deserializes into, so that read had no effect. It
already returned on a clear flag with no dialog open; only the earlier eacec5f opened the round table regardless.

Style: the first include is ../Commands.func.hpp, sizes are sizeof(), the tests are early returns.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
StartReceivingMapFile, from gynt's draft on upstream's reimpl/Synchrony-Commands (70b9f63 at 76.1%, ed4a057 at
81.4%, his newest commit on that branch's file; the status line reads 76.1%). His other branches carry an older
form, 46b7c94 at 70.37%. On main's headers the draft reads reccmp 84.1
(normalized 79.8), and now 100.0 (normalized 100.0). quick_diff 111/111 at 0.9910 (the draft: 0.8288); the rest is
the /GS cookie load, which reccmp is told to ignore.

What the match needed:
- The map name lookup is written inside the first serialize call, so the size and the two flags are pushed before
  the lookup is called.
- The name's copy and the two searches for its end are strcpy and strcat, with ".map" as the macro S__MAP_005A2294,
  because the original copies it inline (as main's MenuItemActionHandler_SendReceiveMap_Main does).

Wilps's version on gynt's fork (reimpl/Wilps-2026-10-18, 8ca7861, 2026-10-27) already has all three: the nested
lookup, strcpy and strcat.

Style: the strcpy pragma, the first include is ../Commands.func.hpp, the using lines and block comments are gone,
the execute half and the host are early returns, "wb" is s_wb_005a5510, and the file name is a `char* const` where
the original keeps it (it is fetched before "wb" is pushed).

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ShareQuitGameVote, from gynt's draft on upstream's reimpl/Synchrony-Commands (c7021d2 at 70.8%, 5153b24 at
69.2%, "Dropped return recovered, asm form differs", his newest commit on the file; the status line reads 70.8%).
On main's headers the draft reads reccmp 69.2 (normalized 58.6), and now 100.0 (normalized 100.0). quick_diff
109/109 at 1.0000 (the draft: 100 instructions at 0.7656).

On main the draft needed one rename to compile: field122_0xc70 is quitGameVoteArray.

What the match needed:
- The test of the eight votes is a loop that clears a flag for every slot that hasn't voted yes, then one test of
  the flag. The original has it unrolled (`mov eax, 1`, then `xor eax, eax` after each failed test); the draft's
  chain of eight `&&` jumps out at the first no.
- The vote is stored at `quitGameVoteArray[voter]`, with the local that holds the sender: the original indexes with
  the register it keeps the sender in (0.9315 with the field read again).
- The two message copies are strcpy calls.

Wilps's version on gynt's fork (reimpl/Wilps-2026-10-18, 8ca7861, 2026-10-27) already has all three: the loop over
the slots, the vote stored through the local, and the two strcpy calls.

Style: the strcpy pragma, the first include is ../Commands.func.hpp, the using lines and block comments are gone,
the execute half is an early return, subjectPlayerID is `voter`, the text numbers are decimal with the text above
them ("No", "Yes"), and the loop bound is countof().

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
ShareMapHashForMapName, from gynt's draft on upstream's reimpl/Synchrony-Commands (97bf40d at 73.4%, ca943ba at
75.3%, his newest commit on that branch's file; the status line reads 70.5%). His other branches carry an older
form, 3d9f30d at 68.44%. On main's headers the draft reads reccmp 78.1
(normalized 77.8), and now 100.0 (normalized 100.0). quick_diff 141/143 at 0.9789 (the draft: 138 at 0.8470); the
rest is the /GS cookie load and two alignment jumps the listing doesn't show.

On main the draft needed one rename to compile: field282_0x109d98 is mapTransferStatePerPlayer.

What the match needed:
- The map name lookup is written inside the first serialize call, so the size and the two flags are pushed before
  the lookup is called.
- The name's copy and the two searches for its end are strcpy and strcat, with ".map" as the macro S__MAP_005A2294
  (the original copies it inline). The copy into unknownMapName_01 is a strcpy too.
- The loop over the slots is a for loop with countof().

Fix against the draft: a client whose own copy of the map hashes differently only gets the quit dialog. The
original returns there; the draft went on to queue the command that asks for the map file.

Wilps's version on gynt's fork (reimpl/Wilps-2026-10-18, 8ca7861, 2026-10-27) already has the nested lookup, strcpy
and strcat. It queues the command in an else after the dialog, so it already behaves as the original does.

Style: the strcpy pragma, the first include is ../Commands.func.hpp, the using lines and block comments are gone,
the execute half and the host are early returns, _mapHash is `int mapHash` (the hash function returns int), and
0x3ec is 1004.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…sAllyRequestingGoods

Main's Ghidra sync 1af4c70 (for sourcehold#403) types the second parameter of Actions::ProcessAllyRequestingGoods as
ResourceTypeMin1 (it was int), so passing DAT_GameCommandParam2 to it no longer compiles (C2664). The argument is
cast to ResourceTypeMin1 now, as the call to ProcessAllyGoodsRequest next to it casts its own to ResourceType, and
the file includes ResourceTypeMin1.hpp. Both compile against main's previous declaration too. No other change.

Measured: quick_diff gives the same listing as the pushed head's text, with main 0e4a83b's headers and with
48f7e94's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gynt added a commit that referenced this pull request Nov 24, 2026
The only conflict was the end of cmake/compiler-flags-gl.txt, where both sides added lines; both are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot removed the declaration/type change This requires changes to the generated/exported types or definitions. label Nov 24, 2026
gynt added a commit to kotijekriv/OpenSHC that referenced this pull request Nov 24, 2026
…ished work (sourcehold#431)

* reimplement: SHC_3BB0A8C1_0x00480640 100.0% Reimplemented

InitialAnnounceReply, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
b19c2c6afc ("reimplement: SHC_3BB0A8C1_0x00480640 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* style: InitialAnnounceReply (0x00480640) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x00484450 100.0% Reimplemented

ResetSyncStatusUnk, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
83ab8d678d ("reimplement: SHC_3BB0A8C1_0x00484450 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* style: ResetSyncStatusUnk (0x00484450) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x00485330 100.0% Reimplemented

CloseModalDialogForEveryone, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his
commit faf55c3441 ("reimplement: SHC_3BB0A8C1_0x00485330 100.0% Reimplemented", 2026-10-03), with his status line
from that branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's
headers and the style rules need on top follows in our own commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* style: CloseModalDialogForEveryone (0x00485330) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The BOOLEnum include goes: BOOLEnum is never named here.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x004893C0 100.0% Reimplemented

InitialAnnounceToHost, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his
commit dc6352fea6 ("reimplement: SHC_3BB0A8C1_0x004893C0 100.0% Reimplemented", 2026-10-03), with his status line
from that branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's
headers and the style rules need on top follows in our own commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* style: InitialAnnounceToHost (0x004893C0) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The BOOLEnum include goes: BOOLEnum is never named here.
- 0/1 values are tested by truth.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x00482360 100.0% Reimplemented

ClickChangeTaxes, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
6c33d8cd1d ("reimplement: SHC_3BB0A8C1_0x00482360 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* style: ClickChangeTaxes (0x00482360) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The casts around the command parameters are gone.
- Param0 is cleared with 0 before its low bytes are read, where the draft assigns DAT_CommandActionPlan, which is
  GCS_EXECUTE (0) on that path; the code is the same.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x004823C0 100.0% Reimplemented

ClickChangeRations, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
6481c09f16 ("reimplement: SHC_3BB0A8C1_0x004823C0 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: ClickChangeRations (0x004823C0) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The casts around the command parameters are gone.
- Param0 is cleared with 0 before its low bytes are read, where the draft assigns DAT_CommandActionPlan, which is
  GCS_EXECUTE (0) on that path; the code is the same.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x00482A40 100.0% Reimplemented

ClickBuildingSleep, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
fa6467117d ("reimplement: SHC_3BB0A8C1_0x00482A40 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: ClickBuildingSleep (0x00482A40) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The casts around the command parameters are gone.
- Param0 is cleared with 0 before its low bytes are read, where the draft assigns DAT_CommandActionPlan, which is
  GCS_EXECUTE (0) on that path; the code is the same.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x004843F0 100.0% Reimplemented

ResyncStatus2, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
8fc563bf89 ("reimplement: SHC_3BB0A8C1_0x004843F0 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: ResyncStatus2 (0x004843F0) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The BOOLEnum include goes: BOOLEnum is never named here.
- 0/1 values are tested by truth.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x00484E10 100.0% Reimplemented

TriggerRecalculationOfUnitSameTileLinkage, gynt's file as it stands on upstream's reimpl/Synchrony-Commands
(ca943baa12), from his commit 24c849e69a ("reimplement: SHC_3BB0A8C1_0x00484E10 100.0% Reimplemented", 2026-10-03),
with his status line from that branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as
it is; what main's headers and the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: TriggerRecalculationOfUnitSameTileLinkage (0x00484E10) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The buffer the received values are read into is readBuffer, declared at its first use.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x004850E0 100.0% Reimplemented

BroadCastSyncRelatedStatus, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his
commit 35368abc42 ("reimplement: SHC_3BB0A8C1_0x004850E0 100.0% Reimplemented", 2026-10-03), with his status line
from that branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's
headers and the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: BroadCastSyncRelatedStatus (0x004850E0) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The BOOLEnum include goes: BOOLEnum is never named here.
- 0/1 values are tested by truth.
- The comma expression in the execute test is a statement of its own after an early return.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x004852D0 100.0% Reimplemented

ShareAnnouncementWithHost, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his
commit 19129db85b ("reimplement: SHC_3BB0A8C1_0x004852D0 100.0% Reimplemented", 2026-10-03), with his status line
from that branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's
headers and the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: ShareAnnouncementWithHost (0x004852D0) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The BOOLEnum include goes: BOOLEnum is never named here.
- 0/1 values are tested by truth.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x00484A00 100.0% Reimplemented

TribeRelated1, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
78b3c13828 ("reimplement: SHC_3BB0A8C1_0x00484A00 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: TribeRelated1 (0x00484A00) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The casts around the command parameters are gone.
- The buffer the received values are read into is readBuffer, declared at its first use.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x00484DA0 100.0% Reimplemented

DeselectUnit, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
c0d6a7b203 ("reimplement: SHC_3BB0A8C1_0x00484DA0 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: DeselectUnit (0x00484DA0) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The casts around the command parameters are gone.
- The buffer the received values are read into is readBuffer, declared at its first use.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x00486320 100.0% Reimplemented

ShareAIVHash, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
cd50aa82c9 ("reimplement: SHC_3BB0A8C1_0x00486320 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: ShareAIVHash (0x00486320) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- Numbers are decimal.
- x - 1U <= 7 is x >= 1 && x <= 8.
- Both sizes are sizeof(aivFileHash) (512 bytes).

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x00480680 100.0% Reimplemented

AnnounceGameVersion, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
acd48921ad ("reimplement: SHC_3BB0A8C1_0x00480680 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: AnnounceGameVersion (0x00480680) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- x - 1U <= 7 is x >= 1 && x <= 8.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x004855C0 100.0% Reimplemented

NotifyLaggingPlayer, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
8511c194ef ("reimplement: SHC_3BB0A8C1_0x004855C0 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: NotifyLaggingPlayer (0x004855C0) follows the style guide

On top of gynt's version in the commit before, which does not build on main as it is (below). reccmp reads 100.0
(normalized 100.0), with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The buffer the received values are read into is readBuffer, declared at its first use.
- It builds on main with main's field names: GameSynchronyState::field131_0xcd4 is lagNotificationCode.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x00485650 100.0% Reimplemented

SomeKindOfMultiplayerPingUnk, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from
his commit d2e9a70af1 ("reimplement: SHC_3BB0A8C1_0x00485650 100.0% Reimplemented", 2026-10-03), with his status
line from that branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what
main's headers and the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: SomeKindOfMultiplayerPingUnk (0x00485650) follows the style guide

On top of gynt's version in the commit before, which does not build on main as it is (below). reccmp reads 100.0
(normalized 100.0), with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The buffer the received values are read into is readBuffer, declared at its first use.
- The BOOLEnum include goes: BOOLEnum is never named here.
- 0/1 values are tested by truth.
- It builds on main with main's field names: GameSynchronyState::field131_0xcd4 is lagNotificationCode.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x0048FC20 100.0% Reimplemented

ResyncStartCS_CS_Sub, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
4c178c8ce5 ("reimplement: SHC_3BB0A8C1_0x0048FC20 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: ResyncStartCS_CS_Sub (0x0048FC20) follows the style guide

On top of gynt's version in the commit before, which does not build on main as it is (below). reccmp reads 100.0
(normalized 100.0), with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The BOOLEnum include goes: BOOLEnum is never named here.
- It builds on main with main's field names: GameSynchronyState::field259_0x109290 is resyncStartTime;
  GameSynchronyState::field267_0x1092b0 is connectionInfoExpanded; GameSynchronyState::field76_0xbe8 is field_0xbe8.
- connectionInfoExpanded is a BOOLEnum: it is set to FALSE.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x0048FFD0 100.0% Reimplemented

HostRemoveAIPlayerBySlotID, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his
commit 13918ee6eb ("reimplement: SHC_3BB0A8C1_0x0048FFD0 100.0% Reimplemented", 2026-10-03), with his status line
from that branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's
headers and the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: HostRemoveAIPlayerBySlotID (0x0048FFD0) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The buffer the received values are read into is readBuffer, declared at its first use.
- The BOOLEnum include goes: BOOLEnum is never named here.
- 0/1 values are tested by truth.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x00480E60 100.0% Reimplemented

MakeUnitSelection, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
469b0b2f5d ("reimplement: SHC_3BB0A8C1_0x00480E60 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: MakeUnitSelection (0x00480E60) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The casts around the command parameters are gone.
- Both sizes are sizeof(selectedUnitsBitFlags) (400 bytes).

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x004821E0 100.0% Reimplemented

ClickRecruitUnit, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
4cf7813cf9 ("reimplement: SHC_3BB0A8C1_0x004821E0 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: ClickRecruitUnit (0x004821E0) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The casts around the command parameters are gone.
- Param0 is cleared with 0 before its low bytes are read, where the draft assigns DAT_CommandActionPlan, which is
  GCS_EXECUTE (0) on that path; the code is the same.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x00482620 100.0% Reimplemented

ClickBuyOrSell, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
e45362c183 ("reimplement: SHC_3BB0A8C1_0x00482620 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: ClickBuyOrSell (0x00482620) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The casts around the command parameters are gone.
- The resource type is cleared with 0, without the cast.
- Param0 is cleared with 0 before its low bytes are read, where the draft assigns DAT_CommandActionPlan, which is
  GCS_EXECUTE (0) on that path; the code is the same.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x004847B0 100.0% Reimplemented

ClickUnitStance, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
140ef47ea0 ("reimplement: SHC_3BB0A8C1_0x004847B0 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: ClickUnitStance (0x004847B0) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The casts around the command parameters are gone.
- The buffer the received values are read into is readBuffer, declared at its first use.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x00484960 100.0% Reimplemented

SiegeEngineRelated, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
fd0ff88d5b ("reimplement: SHC_3BB0A8C1_0x00484960 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: SiegeEngineRelated (0x00484960) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The casts around the command parameters are gone.
- The buffer the received values are read into is readBuffer, declared at its first use.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x00484A70 100.0% Reimplemented

ReleaseDogs, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
e6650a9553 ("reimplement: SHC_3BB0A8C1_0x00484A70 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: ReleaseDogs (0x00484A70) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The casts around the command parameters are gone.
- The buffer the received values are read into is readBuffer, declared at its first use.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x00485520 100.0% Reimplemented

FlagsAndBraziersCommandUnk, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his
commit cf376edf99 ("reimplement: SHC_3BB0A8C1_0x00485520 100.0% Reimplemented", 2026-10-03), with his status line
from that branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's
headers and the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: FlagsAndBraziersCommandUnk (0x00485520) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The casts around the command parameters are gone.
- The buffer the received values are read into is readBuffer, declared at its first use.
- The short readBuffer goes into the two parameters without the (uint).

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x00485790 100.0% Reimplemented

ResyncStatusStart, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
b19c1acba3 ("reimplement: SHC_3BB0A8C1_0x00485790 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: ResyncStatusStart (0x00485790) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The buffer the received values are read into is readBuffer, declared at its first use.
- Numbers are decimal.
- Both do/while loops are for loops over countof(sharedDesyncFlags), the received byte read into readBuffer inside
  the loop.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x00485E80 100.0% Reimplemented

MapSendingRelated, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
ed8648fbfa ("reimplement: SHC_3BB0A8C1_0x00485E80 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: MapSendingRelated (0x00485E80) follows the style guide

On top of gynt's version in the commit before, which does not build on main as it is (below). reccmp reads 100.0
(normalized 100.0), with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The buffer the received values are read into is readBuffer, declared at its first use.
- The BOOLEnum include goes: BOOLEnum is never named here.
- Numbers are decimal.
- 0/1 values are tested by truth.
- It builds on main with main's field names: GameSynchronyState::field290_0x109e20 is mapSendRequestStatePerPlayer.
- The comma expression in the host test is a statement of its own after an early return; the file handle is compared
  with NULL and the received byte with 1.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x00480DB0 100.0% Reimplemented

ClickNavigateMenuOrEscape, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his
commit c7b288ad47 ("reimplement: SHC_3BB0A8C1_0x00480DB0 100.0% Reimplemented", 2026-10-03), with his status line
from that branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's
headers and the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: ClickNavigateMenuOrEscape (0x00480DB0) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone
  (Ghidra's note on the function stays as one // line above it).
- The execute half is an early return.
- The casts around the command parameters are gone.
- The buffer the received values are read into is readBuffer, declared at its first use.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x004856E0 100.0% Reimplemented

ShareGameStatePartialHashes, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his
commit 28d3298228 ("reimplement: SHC_3BB0A8C1_0x004856E0 100.0% Reimplemented", 2026-10-03), with his status line
from that branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's
headers and the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: ShareGameStatePartialHashes (0x004856E0) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- Numbers are decimal.
- The twelve values are HASH_PartialHashPerPlayer.player[slot].domain[i]; gynt's draft reached them through
  DAT_PlayerMatchTimes + 9, past the end of that array. Both do/while loops are for loops bounded by
  countof(domain).

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x0048A1F0 100.0% Reimplemented

SendResyncBuilding, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
14ca2ef25d ("reimplement: SHC_3BB0A8C1_0x0048A1F0 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: SendResyncBuilding (0x0048A1F0) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The BOOLEnum include goes: BOOLEnum is never named here.
- Numbers are decimal.
- 0/1 values are tested by truth.
- Both sizes are sizeof(buildings[0]), one element (812 bytes), where the draft has the byte count.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x0048A2A0 100.0% Reimplemented

SendResyncVeg, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
9c5367bdfa ("reimplement: SHC_3BB0A8C1_0x0048A2A0 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: SendResyncVeg (0x0048A2A0) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The BOOLEnum include goes: BOOLEnum is never named here.
- Numbers are decimal.
- 0/1 values are tested by truth.
- Both sizes are sizeof(trees[0]), one element (156 bytes), where the draft has the byte count.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x0048A460 100.0% Reimplemented

SendResyncPlayerData, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
395619eb83 ("reimplement: SHC_3BB0A8C1_0x0048A460 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: SendResyncPlayerData (0x0048A460) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The BOOLEnum include goes: BOOLEnum is never named here.
- Numbers are decimal.
- 0/1 values are tested by truth.
- Both sizes are sizeof(playerDataArray[0]), one element (14836 bytes), where the draft has the byte count.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x0048A710 100.0% Reimplemented

SendResyncEntity, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
e4d787ce57 ("reimplement: SHC_3BB0A8C1_0x0048A710 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: SendResyncEntity (0x0048A710) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The BOOLEnum include goes: BOOLEnum is never named here.
- Numbers are decimal.
- 0/1 values are tested by truth.
- Both sizes are sizeof(entityArray[0]), one element (232 bytes), where the draft has the byte count.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x0048AB40 100.0% Reimplemented

ResyncTeleClimb, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
65309ba47b ("reimplement: SHC_3BB0A8C1_0x0048AB40 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: ResyncTeleClimb (0x0048AB40) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The BOOLEnum include goes: BOOLEnum is never named here.
- Numbers are decimal.
- 0/1 values are tested by truth.
- Both sizes are sizeof(climbData[0]), one element (516 bytes), where the draft has the byte count.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x0048B280 100.0% Reimplemented

SendQuitGameQuestion, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
8f1e58c0fc ("reimplement: SHC_3BB0A8C1_0x0048B280 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: SendQuitGameQuestion (0x0048B280) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The BOOLEnum include goes: BOOLEnum is never named here.
- Numbers are decimal.
- The copy loops are strcpy, with its pragma at the top of the file, as #415 writes them.
- The text of a lookup is a // "..." line above it.
- The question's text is copied with strcpy; its text is the // line above it.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x0048BBE0 100.0% Reimplemented

ResyncVillage, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
65e49a1abb ("reimplement: SHC_3BB0A8C1_0x0048BBE0 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: ResyncVillage (0x0048BBE0) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The BOOLEnum include goes: BOOLEnum is never named here.
- Numbers are decimal.
- 0/1 values are tested by truth.
- Both sizes are sizeof(aivs[0]), one element (28056 bytes), where the draft has the byte count.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x0048BC90 100.0% Reimplemented

ResyncAIZone, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
923c4c246f ("reimplement: SHC_3BB0A8C1_0x0048BC90 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: ResyncAIZone (0x0048BC90) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The BOOLEnum include goes: BOOLEnum is never named here.
- Numbers are decimal.
- 0/1 values are tested by truth.
- heatMaps + n is &heatMaps[n], and 0xf00 and 3840 are sizeof(heatMaps[0]); the receiving half is an early return.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x004833F0 100.0% Reimplemented

AcknowledgeMapExistence, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his
commit 06ce58ccad ("reimplement: SHC_3BB0A8C1_0x004833F0 100.0% Reimplemented", 2026-10-03), with his status line
from that branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's
headers and the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: AcknowledgeMapExistence (0x004833F0) follows the style guide

On top of gynt's version in the commit before, which does not build on main as it is (below). reccmp reads 100.0
(normalized 100.0), with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The BOOLEnum include goes: BOOLEnum is never named here.
- 0/1 values are tested by truth.
- It builds on main with main's field names: GameSynchronyState::field239_0x1072f8 is mapExistenceAckCountdown.
- gynt's _flag and _index are parameter0 and mapIndex, each declared where it is read.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x004834B0 100.0% Reimplemented

ShareMSVMapIndex, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
eac98547dc ("reimplement: SHC_3BB0A8C1_0x004834B0 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: ShareMSVMapIndex (0x004834B0) follows the style guide

On top of gynt's version in the commit before. On main's headers his file reads reccmp 97.9 (normalized 92.3); this
reads 100.0 (normalized 100.0), with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The BOOLEnum include goes: BOOLEnum is never named here.
- 0/1 values are tested by truth.
- The original stores at MenuTextInputState + 0x1050 + mapIndex * 4. gynt's draft writes that as
  DAT_ArrayOfMapIndices[mapIndex + 499], with the array at 0x884 on his branch. On main that array starts at 0x880
  and has 501 entries, so the address lies in the next one: DAT_ArrayOfMapIndices2[mapIndex - 1] (the array at
  0x1054), the form main's MenuItemRenderFunction_SaveLoadMap_TableContent reads the same entries with.
- The two received values are parameter0 and mapIndex, each declared where it is read.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x00484E70 100.0% Reimplemented

ResyncZone, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
6cd4395b6a ("reimplement: SHC_3BB0A8C1_0x00484E70 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: ResyncZone (0x00484E70) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The BOOLEnum include goes: BOOLEnum is never named here.
- Numbers are decimal.
- 0/1 values are tested by truth.
- Both sizes are sizeof(grid[0]), one row of 40 cells (6400 bytes), where the draft has the byte count.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x00485020 100.0% Reimplemented

CommandSelectionReplenishAmmo, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from
his commit a4dfc5780b ("reimplement: SHC_3BB0A8C1_0x00485020 100.0% Reimplemented", 2026-10-03), with his status
line from that branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what
main's headers and the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: CommandSelectionReplenishAmmo (0x00485020) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The casts around the command parameters are gone.
- The buffer the received values are read into is readBuffer, declared at its first use.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x00485210 100.0% Reimplemented

SyncPacketSizeAnnouncement, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his
commit c49a65aef9 ("reimplement: SHC_3BB0A8C1_0x00485210 100.0% Reimplemented", 2026-10-03), with his status line
from that branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's
headers and the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: SyncPacketSizeAnnouncement (0x00485210) follows the style guide

On top of gynt's version in the commit before, which does not build on main as it is (below). reccmp reads 100.0
(normalized 100.0), with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The BOOLEnum include goes: BOOLEnum is never named here.
- Numbers are decimal.
- 0/1 values are tested by truth.
- It builds on main with main's field names: GameSynchronyState::field67_0xba4 is field_0xba4;
  GameSynchronyState::field73_0xbdc is resyncTransferTotalSize.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x0048AA80 100.0% Reimplemented

ResyncMoat, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
38851ffddc ("reimplement: SHC_3BB0A8C1_0x0048AA80 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: ResyncMoat (0x0048AA80) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The BOOLEnum include goes: BOOLEnum is never named here.
- Numbers are decimal.
- 0/1 values are tested by truth.
- Both sizes are 100 * sizeof(moats[0]) (1600 bytes): the hundred moats from index Param0 * 100.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x0048ABF0 100.0% Reimplemented

ResyncPitch, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
cfdcbeccd0 ("reimplement: SHC_3BB0A8C1_0x0048ABF0 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: ResyncPitch (0x0048ABF0) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The BOOLEnum include goes: BOOLEnum is never named here.
- Numbers are decimal.
- 0/1 values are tested by truth.
- Both sizes are 100 * sizeof(pitchDitches[0]) (2000 bytes): the hundred ditches from index Param0 * 100.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x00481050 100.0% Reimplemented

ClickErase, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from his commit
9ed0f09f5c ("reimplement: SHC_3BB0A8C1_0x00481050 100.0% Reimplemented", 2026-10-03), with his status line from that
branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what main's headers and
the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: ClickErase (0x00481050) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The casts around the command parameters are gone.
- Param0 is cleared with 0 before its low bytes are read, where the draft assigns DAT_CommandActionPlan, which is
  GCS_EXECUTE (0) on that path; the code is the same.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* reimplement: SHC_3BB0A8C1_0x00482550 100.0% Reimplemented

ClickSomethingWithDrawBridgeUnk, gynt's file as it stands on upstream's reimpl/Synchrony-Commands (ca943baa12), from
his commit 84cec66487 ("reimplement: SHC_3BB0A8C1_0x00482550 100.0% Reimplemented", 2026-10-03), with his status
line from that branch. His fork's reimpl/Synchrony-Commands (6fa5eaa533) has the same file. Taken as it is; what
main's headers and the style rules need on top follows in our own commit.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

* style: ClickSomethingWithDrawBridgeUnk (0x00482550) follows the style guide

On top of gynt's version in the commit before; the code is the same, reccmp 100.0 (normalized 100.0) before and
after, with the data resolvers and the function resolvers of this branch's functions on.

- The first include is ../Commands.func.hpp, once; the using lines and the imported block comments are gone.
- The execute half is an early return.
- The casts around the command parameters are gone.
- Param0 is cleared with 0 before its low bytes are read, where the draft assigns DAT_CommandActionPlan, which is
  GCS_EXECUTE (0) on that path; the code is the same.

The status line is gynt's, 100.0% (Reimplemented), from the commit before.

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

---------

Co-authored-by: Gynt <gynt@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
kotijekriv and others added 3 commits November 24, 2026 10:00
The only conflict was the end of cmake/compiler-flags-gl.txt, where both sides added lines; both are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The only conflict was the end of cmake/compiler-flags-gl.txt, where both sides added lines; both are kept.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This PR puts CommandSwitchTeams, countPlayersInSameTeam and addChatMessageToDisplayList on
cmake/compiler-flags-gl.txt. CommandSwitchTeams has to see countPlayersInSameTeam's body and gets an entry at its
address with that callee. The /GL lines stay as they are.

Measured as sourcehold#398's edges were: the caller's file compiled with the callee files in its unit, against the caller
alone, quick_diff on this head merged with main 7c2e4d6, every function resolver that has a .cpp and every
struct resolver on.

- CommandSwitchTeams: 0.6638 alone, 1.0000 with countPlayersInSameTeam, and 1.0000 with both of its /GL callees.
  addChatMessageToDisplayList changes nothing (0.6638 with it alone, 1.0000 without it).
- addChatMessageToDisplayList reads 1.0000 alone; its one /GL-listed callee, LowLevelMemory::copyData, changes
  nothing. receiveAllTransmittedCommands on main, which calls it, reads 0.9600 with and without its body.
  countPlayersInSameTeam calls no /GL-listed function.

With every .cpp of that merge as the build list, cmake/function-visibility-units.py makes 25 units holding 110
source files (24 and 108 before): CommandSwitchTeams and countPlayersInSameTeam form a unit of their own. No
internal names clash, and the 13 names it skips are the ones main's manifest skips.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gynt
gynt added this pull request to the merge queue Nov 24, 2026
Merged via the queue into sourcehold:main with commit f015e8f Nov 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants